<template>
  <div class="system">
    <div class="header">
      <div class="header-left">
        <span>项目</span>
        <el-select v-model="test" placeholder="ABC综合体项目">
          <el-option label="ABC综合体项目" :value="test"> </el-option>
        </el-select>
      </div>
      <div class="header-right">
        <div>
          <span>系统设置 / {{ parentTitle }}</span>
        </div>
        <div class="weather">
          <Weather></Weather>
          <Date></Date>
        </div>
      </div>
    </div>
    <div class="content">
      <div class="left">
        <el-col :span="24">
          <el-menu
            default-active="/system/department"
            class="el-menu-vertical-demo"
            background-color="#3a4049"
            :router="true"
            text-color="#fff"
            active-text-color="#ffd04b"
          >
            <el-menu-item index="/system/department">
              <i class="el-icon-menu"></i>
              <span slot="title">部门管理</span>
            </el-menu-item>
            <el-menu-item index="/system/user">
              <i class="el-icon-user-solid"></i>
              <span slot="title">用户管理</span>
            </el-menu-item>
            <el-menu-item index="/system/role">
              <i class="el-icon-s-management"></i>
              <span slot="title">角色管理</span>
            </el-menu-item>
          </el-menu>
        </el-col>
      </div>
      <div class="right">
        <router-view @title="title"></router-view>
      </div>
    </div>
  </div>
</template>

<script>
import Date from "../fault/Date.vue";
import Weather from "../fault/Weather.vue";
export default {
  components: { Date, Weather },
  data() {
    return {
      test: "",
      parentTitle: "",
    };
  },
  methods: {
    title(n) {
      this.parentTitle = n;
    },
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.system {
  min-width: 1200px;
  display: flex;
  flex-direction: column;
  height: 100%;
  .header {
    color: #fff;
    font-weight: bold;
    height: 50px;
    background: #6c7076;
    display: flex;
    align-items: center;
    /deep/.header-left {
      height: 30px;
      width: 258px;
      border-right: 2px solid #fff;
      display: flex;
      align-items: center;
      justify-content: space-around;
      /deep/.el-input__inner {
        height: 35px;
        width: 180px;
      }
    }
    .header-right {
      flex: 1;
      margin-left: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .weather {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
    }
  }
  .content {
    flex: 1;
    display: flex;
    justify-content: center;
    .left {
      width: 260px;
      background: #3a4049;
      .el-col {
        height: 100%;
        .el-menu {
          height: 100%;
          border: none;
        }
      }
    }
    .right {
      width: calc(100% - 260px);
    }
  }
}
</style>